package com.bcinfo.iccard.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.bcinfo.iccard.model.RechargeableCardCancelDetail;
import com.bcinfo.iccard.model.RechargeableCardCreditDetail;

public interface RechargeableCardCreditDetailMapper
{
    int deleteByPrimaryKey(Long rechargeableCardDetailId);

    int insert(RechargeableCardCreditDetail record);

    int insertSelective(RechargeableCardCreditDetail record);

    RechargeableCardCreditDetail selectByPrimaryKey(Long rechargeableCardDetailId);

    int updateByPrimaryKeySelective(RechargeableCardCreditDetail record);

    int updateByPrimaryKey(RechargeableCardCreditDetail record);

    /**
     * 销户卡每日汇总 条数<br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: Administrator<br/>
     * <p>
     * Date: 2013-12-6-上午10:39:37<br/>
     * <p>
     * 
     * @param beginTime
     * @param endTime
     * @return
     * 
     */
    int selectSumCountByDayAndStatus(@Param("beginTime") String beginTime, @Param("endTime") String endTime,
            @Param("status")Short status);

    /**
     * 销户卡每日汇总 每页明细 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: Administrator<br/>
     * <p>
     * Date: 2013-12-6-上午10:39:40<br/>
     * <p>
     * 
     * @param beginTime
     * @param endTime
     * @param benginIndex
     * @param pageSize
     * @return
     * 
     */
    List<RechargeableCardCreditDetail> selectSumByDayAndStatus(@Param("beginTime") String beginTime,
            @Param("endTime") String endTime, @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize,
            @Param("status")Short status);

    /**
     * 充值卡对账列表 <br/>
     * <p>
     * Description: 充值卡对账列表 <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-19-下午7:30:12<br/>
     * <p>
     * 
     * @param userId
     * @param benginIndex
     * @param pageSize
     * @return
     * 
     */
    List<Map<String, Object>> selectRechargeableCardReconciliationList(@Param("userId") String userId,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    /**
     * 充值卡对账列表总数 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-19-下午7:48:46<br/>
     * <p>
     * 
     * @param userId
     * @return
     * 
     */
    int selectRechargeableCardReconciliationCount(@Param("userId") String userId);

    /**
     * 
     * 销售人员对账列表总数 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-20-下午3:37:51<br/>
     * <p>
     * 
     * @param userId
     * @param scdzrq
     * @return
     * 
     */
    int selectReconciliationCount(@Param("userId") String userId, @Param("scdzrq") String scdzrq,
            @Param("newDate") String newDate, @Param("opStatus") String opStatus);

    /**
     * 
     * 销售人员对账列表 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-20-下午3:38:10<br/>
     * <p>
     * 
     * @param userId
     * @param scdzrq
     * @param benginIndex
     * @param pageSize
     * @return
     * 
     */
    List<Map<String, Object>> selectReconciliationList(@Param("userId") String userId, @Param("scdzrq") String scdzrq,
            @Param("newDate") String newDate, @Param("opStatus") String opStatus,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    /**
     * 销售人员对账列表金额总和 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-20-下午3:54:36<br/>
     * <p>
     * 
     * @param userId
     * @param scdzrq
     * @return
     * 
     */
    String selectReconciliationSum(@Param("userId") String userId, @Param("scdzrq") String scdzrq,
            @Param("newDate") String newDate, @Param("opStatus") String opStatus);

    /**
     * 
     * 对账 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-23-下午2:24:56<br/>
     * <p>
     * 
     * @param userId
     * @param scdzrq
     * @param newDate
     * @param opStatus
     * @return
     * 
     */
    int updateReconciliation(@Param("userId") String userId, @Param("scdzrq") String scdzrq,
            @Param("newDate") String newDate, @Param("opStatus") String opStatus);

    /**
     * 对账添加日志 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: zhaosl<br/>
     * <p>
     * Date: 2013-12-23-下午2:43:41<br/>
     * <p>
     * 
     * @param userId
     * @param scdzrq
     * @param newDate
     * @param dzje
     * @param accountId
     * @return
     * 
     */
    int insertReconciliationLog(@Param("userId") String userId, @Param("scdzrq") String scdzrq,
            @Param("newDate") String newDate, @Param("dzje") String dzje, @Param("accountId") String accountId);

    /**
     * 一句话描述 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: Administrator<br/>
     * <p>
     * Date: 2013-12-26-下午03:40:16<br/>
     * <p>
     * 
     * @param cardNum
     * @param userId
     * @param beginTime
     * @param endTime
     * @param benginIndex
     * @param pageSize
     * @return
     * 
     */
    List<RechargeableCardCancelDetail> selectCancelDetailsList(@Param("cardNum") String cardNum,
            @Param("userId") Long userId, @Param("beginTime") String beginTime, @Param("endTime") String endTime,
            @Param("benginIndex") int benginIndex, @Param("pageSize") int pageSize);

    /**
     * 一句话描述 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: Administrator<br/>
     * <p>
     * Date: 2013-12-26-下午03:50:47<br/>
     * <p>
     * 
     * @param cardNum
     * @param userId
     * @param beginTime
     * @param endTime
     * @return
     * 
     */
    int selectCancelCount(@Param("cardNum") String cardNum, @Param("userId") Long userId,
            @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    /**
     * 查询退款总额 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: Administrator<br/>
     * <p>
     * Date: 2014-1-2-上午10:30:52<br/>
     * <p>
     * 
     * @param beginTime
     * @param endTime
     * @return
     * 
     */
    float selectCancelSum(@Param("beginTime") String beginTime, @Param("endTime") String endTime);
}